<template>
	<tm-fullView>
		<tm-menubars title="文件上传" color="bg-gradient-primary-lighten" :showback="true"></tm-menubars>
		<view class="fulled-height pa-32">
			<tm-sheet :margin="[0,0]" >
				<text class="text-size-m">此组件只适合H5,微信小程序，QQ小程序使用。可以上传任意文件。在微信和QQ小程序中可以预览文档和图像，视频文件。它的用法与upload图像上传组件一致</text>
			</tm-sheet>
			<view style="height: 24rpx;"></view>
			<tm-sheet :margin="[0,0]">
				<view class="text-size-n pt-0 pb-24">基础示例</view>
				<tm-uploadfile :autoUpload="true"></tm-uploadfile>
				<view class="text-size-n pt-24 pb-24">自定插槽</view>
				<tm-uploadfile ref="upload" >
					<template v-slot:right="{info}">
						<view>
							<tm-button @click="$refs.upload.opendoc(info.data)" size="s">预览</tm-button>
							<tm-button @click="$refs.upload.del(info.index)" size="s" theme="red">删除</tm-button>
						</view>
					</template>
				</tm-uploadfile>
			</tm-sheet>
		</view>
	</tm-fullView>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods: {
			
		},
	}
</script>

<style lang="scss">

</style>
